<br/>
<div style='float:right'>
  <%=link_to '[生成会议座次报表]',:controller=>'reporter',:action=>'meeting_place_report',:id=>meeting_place.id%>
  <a href="#" onclick="jQuery('#meeting_places_by_<%=meeting_place.id%>').hide('fold')">[隐藏这个区域]</a>
</div>
<br/>
<%meeting_place.meeting_rows.each do |meeting_row|%>
  <fieldset id="pending_meeting_row_<%=meeting_row.id%>">
    <legend>第<%=meeting_row.name%>排</legend>
    <ul class="horizontal" id="meeting_row_<%=meeting_row.id%>">
      <%meeting_row.users.each do |user|%>
        <%=render :partial=>'meeting_row_user',:locals=>{:meeting_row=>meeting_row,:user=>user}%>
      <%end%>
    </ul>
  </fieldset>
  <%=drop_receiving_element("pending_meeting_row_#{meeting_row.id}",:accept=>'.pending_user',:with=>"'id='+ encodeURIComponent(($(ui.draggable).attr('id')).split('_').last()) + ';current_row=' + #{meeting_row.id}+ ';row=' + encodeURIComponent(($(ui.draggable).attr('id')).split('_').first())",:url=>{:action=>'move_user'})%>
  <%=sortable_element "meeting_row_#{meeting_row.id}",:constraint=>'false',:overlap=>'horizontal',:url=>{:action=>"sort_row",:id=>meeting_row.id}%>
  <br/>
  <div style='float:right'>
    <a href="#" onclick="Element.toggle('add_user_<%=meeting_row%>');return false">添加人员</a>
  </div>
  <div id="add_user_<%=meeting_row%>"  style='display:none'>
    <%remote_form_for :user,:url=>{:controller=>'meeting_places',:action=>'add_user',:id=>"#{meeting_row.id}"} do |f|%>
      根据<%=f.select :category,%w{部门 级别},{},{ "onchange" => remote_function(
                    :with => "'from='+value+';id='+#{meeting_place.id}",
                    :update => "next_select_by_#{meeting_row.id}",
                    :url => { :action => :select_with_ajax } ) }%>
      <span id="next_select_by_<%=meeting_row.id%>"></span>
      <%=f.submit '确定'%>
    <%end%>
  </div>
  <br/>
<%end%>